{extend name="../../admin/view/table"}

{block name="button"}
<!--{if auth("add")}-->
<button class='layui-btn layui-btn-sm layui-btn-primary' data-modal='{:url("add")}' data-title="添加类型">添加类型</button>
<!--{/if}-->

<!--{/if}-->
{/block}

{block name="content"}

<div class="think-box-shadow">
    {include file='notarialoffice/notarized_matters/index_search'}
    <table id="FormTable" data-url="{:sysuri()}" data-target-search="form.form-search"></table>
</div>

<script>
    $(function () {
        $('#FormTable').layTable({
            sort: {field: 'id', type: 'desc'},
            cols: [[
                {field: 'id', title: 'ID', minWidth: 100},
                {field: 'notarial_office_name', title: '所属公证处', minWidth: 100},
                {field: 'name', title: '公证类型', minWidth: 100},
                {field: 'create_at', title: '创建时间', minWidth: 170, align: 'center'},
                {toolbar: '#toolbar', title: '操作面板', minWidth: 200, align: 'center', fixed: 'right'},
            ]]
        });
    });
</script>

<!-- 操控面板的模板 -->
<script type="text/html" id="toolbar">
    <!--{if auth('edit')}-->
    <a class="layui-btn layui-btn-sm" data-title="编辑事项" data-modal='{:url("edit")}?id={{d.id}}'>编 辑</a>
    <!--{/if}-->

    <!--{if auth('remove')}-->
    <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除此事项吗？" data-action="{:url('remove')}" data-value="id#{{d.id}}">删 除</a>
    <!--{/if}-->
</script>
{/block}
